package com.cskaoyan.mapper;

import com.cskaoyan.bean.Category;
import com.cskaoyan.bean.CategoryExample;
import com.cskaoyan.vo.CategoryVO;
import com.cskaoyan.vo.L1VO;
import com.cskaoyan.vo.LevelCategoryVO;
import com.cskaoyan.wx.vo.GoodsCategoryVO;
import com.cskaoyan.wx.vo.HomeIndexVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    long countByExample(CategoryExample example);

    int deleteByExample(CategoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    List<Category> selectByExample(CategoryExample example);

    Category selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<CategoryVO> selectByGroup();

    List<LevelCategoryVO> getLeveledList();

    List<L1VO> getL1();

    List<HomeIndexVO.FloorGoods> getFloorGoodsList();


    // id 为一级目录
    GoodsCategoryVO getGoodsCategory(int id);

    Category selectFirstCatalog();

}